Skip to content

Add MSBuild log analyzer to CI workflows#932

Merged
jasonleenaylor merged 3 commits into
mainfrom
claude/dazzling-mcnulty-66ac53
Jun 9, 2026
Merged

Add MSBuild log analyzer to CI workflows#932
jasonleenaylor merged 3 commits into
mainfrom
claude/dazzling-mcnulty-66ac53

Conversation

@jasonleenaylor

@jasonleenaylor jasonleenaylor commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add scripts/tools/analyze_build_log.py and scripts/tools/build_error_enrichments.py — a Python log analyzer that streams MSBuild logs in a single pass to identify root-cause build failures
  • Replace the simple grep-based "Scan Build Output" step in both patch-installer-cd.yml and base-installer-cd.yml with the new analyzer
  • Build errors now appear directly on the workflow run page via $GITHUB_STEP_SUMMARY (markdown with step table, root cause, collapsible context) and ::error:: annotations

Motivation

When builds fail, the old "Scan Build Output" step only checked for N Error(s) summary lines — it didn't show which project failed, the actual error messages, or surrounding context. Diagnosing failures required downloading the (often 1GB+) build log artifact and running a local analysis script.

What changed

  • New: scripts/tools/analyze_build_log.py — single-pass streaming parser for MSBuild logs, produces GitHub job summary markdown and error annotations
  • New: scripts/tools/build_error_enrichments.py — extensible registry of known error patterns (currently WiX PYRO0305) with on-disk file lookups for root-cause enrichment
  • Modified: .github/workflows/patch-installer-cd.yml — "Scan Build Output" → "Analyze Build Log" with if: always() so it runs even when the build fails
  • Modified: .github/workflows/base-installer-cd.yml — same change

Test plan

  • Trigger a patch build and verify the job summary renders on the Actions run page
  • Trigger a base build and verify the same
  • Confirm a failing build shows error details with context in the summary
  • Confirm a passing build shows a clean summary and exits 0

🤖 Generated with Claude Code


This change is Reviewable

Replace the simple grep-based "Scan Build Output" step in both
patch-installer-cd.yml and base-installer-cd.yml with a Python
analyzer that streams the build log, identifies root-cause failures
with context, and surfaces them directly in the GitHub Actions job
summary via GITHUB_STEP_SUMMARY and ::error:: annotations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasonleenaylor jasonleenaylor marked this pull request as ready for review June 8, 2026 21:03
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   11m 37s ⏱️ +19s
4 249 tests ±0  4 176 ✅ ±0  73 💤 ±0  0 ❌ ±0 
4 258 runs  ±0  4 185 ✅ ±0  73 💤 ±0  0 ❌ ±0 

Results for commit d0c9384. ± Comparison against base commit 4c35c2f.

♻️ This comment has been updated with latest results.

The break on reaching _MAX_ERRORS_DETAIL only exited the inner loop,
so subsequent failed steps would each print a header and duplicate
truncation message. Now the outer loop also breaks at the limit and
the truncation message is printed once after both loops.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Python-based MSBuild log analyzer to CI so workflow runs surface actionable build-failure summaries and annotations directly in the GitHub Actions UI, replacing the prior grep-based error scan.

Changes:

  • Added scripts/tools/analyze_build_log.py to parse MSBuild logs, generate a $GITHUB_STEP_SUMMARY report, and emit ::error annotations.
  • Added scripts/tools/build_error_enrichments.py to enrich known build failures (currently WiX PYRO0305) with root-cause context via on-disk lookups.
  • Updated patch/base installer CD workflows to run the analyzer step (with if: always()).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
scripts/tools/build_error_enrichments.py Adds enrichment registry + WiX PYRO0305 root-cause lookup helpers.
scripts/tools/analyze_build_log.py Implements streaming MSBuild log parsing + job summary markdown + annotations emission.
.github/workflows/patch-installer-cd.yml Replaces grep scan step with analyzer invocation.
.github/workflows/base-installer-cd.yml Replaces grep scan step with analyzer invocation.

Comment thread scripts/tools/analyze_build_log.py
Comment thread scripts/tools/analyze_build_log.py
Comment thread .github/workflows/patch-installer-cd.yml
Comment thread .github/workflows/base-installer-cd.yml
@johnml1135 johnml1135 self-requested a review June 9, 2026 14:43
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jasonleenaylor jasonleenaylor merged commit a8015e5 into main Jun 9, 2026
6 checks passed
@jasonleenaylor jasonleenaylor deleted the claude/dazzling-mcnulty-66ac53 branch June 9, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants